<?php

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
require_once ("includes/connect.php");
require_once ("includes/function.php");

$id = $_REQUEST["id"];
$cheque_expire = $_REQUEST["cheque_expire"];
$sso = $_REQUEST["sso"];

if ($id) {
    $sql = "UPDATE tbl_config "
            . " SET cheque_expire = '$cheque_expire' "
            . " , sso = '$sso' "
            . " WHERE id = '$id' ";
} else {
    $sql = "INSERT INTO tbl_config (cheque_expire, sso) "
            . " VALUES ('$cheque_expire', '$sso')";
}
//echo $sql;

$db = NEW myDBS();
$db->selectDB("account");
$db->runSQL($sql) or die(mysql_error());
?>

